cmake_minimum_required(VERSION 3.16)
project(ukui-index-framework VERSION 1.0 LANGUAGES C CXX)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_INSTALL_PREFIX "/usr")

include(GNUInstallDirs)

find_package(PkgConfig)
pkg_check_modules(PROTOBUF REQUIRED protobuf)
find_package(QT NAMES Qt5 Qt6 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS DBus Gui Network)
find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS Widgets)

add_subdirectory(client-demo)
add_subdirectory(host)
add_subdirectory(service)
add_subdirectory(common)
